package com.example.forum.service;

import com.example.forum.model.Article;
import com.example.forum.model.User;
import org.springframework.web.multipart.MultipartFile;

public interface IUserService {

    /**
     * 用户注册
     * @param user
     */
    void createNormalUser(User user);

    /**
     * 用户登录
     * @param username
     * @param password
     * @return
     */
    User login(String username,String password);

    User getUserInfo(Long id);

    Integer updateArticleCount(Article article);

    Integer updateUser(User user);


    Integer updateUserPassword(Long userId,String newPassword);

    String loadUserPhoto(String filename, MultipartFile file,Long userId);

}
